package com.atguigu.doc;

import com.atguigu.pojo.Product;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * ClassName:ProductDoc
 * Package:com.atguigu.doc
 * Description:
 *
 * @Author 应永豪
 * @Create 2024/4/22 9:24
 * @Version 1.0
 */
@Data
@NoArgsConstructor
public class ProductDoc extends Product {
    private String all;
    public ProductDoc(Product product){
        super(product.getProductId(),product.getProductName(),product.getCategoryId(),
                product.getProductTitle(),product.getProductIntro(),product.getProductPicture(),
                product.getProductPrice(),product.getProductSellingPrice(),product.getProductNum(),
                product.getProductSales());

        this.all = product.getProductName()+product.getProductTitle()+product.getProductIntro();
    }
}
